package com.agstar.designpatten.behavioral.memento;

import java.util.Stack;

/**
 * @author agstar
 * @date 2020/4/24 17:08
 */
public class ArticleMementoManager {
    private final Stack<ArticleMemento> articleMementoStack = new Stack<>();

    public ArticleMemento getMemento(){
        return articleMementoStack.pop();
    }
    public void setMemento(ArticleMemento articleMemento){
        articleMementoStack.push(articleMemento);
    }
}
